//
//  PiPViewManager.m
//  AVFloatView
//
//  Created by hulinhu on 2020/10/22.
//

#import "PiPViewManager.h"

@implementation PiPViewManager

+ (instancetype)sharedSingleton {
    return [[self alloc] init];
}

// 防止外部调用alloc 或者 new
+ (instancetype)allocWithZone:(struct _NSZone *)zone {
    static PiPViewManager *_sharedSingleton = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        _sharedSingleton = [super allocWithZone:zone];
    });
    return _sharedSingleton;
}

// 防止外部调用copy
- (id)copyWithZone:(nullable NSZone *)zone {
    return [PiPViewManager sharedSingleton];
}

// 防止外部调用mutableCopy
- (id)mutableCopyWithZone:(nullable NSZone *)zone {
    return [PiPViewManager sharedSingleton];
}

@end
